package org.longteng.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.longteng.dao.model.OauthClient;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 开发给供电侧的接口应用token配置表dao
 * @author Hymn
 * @date 2022/12/15
 */
@Mapper
@CacheNamespace  //     //使用二级缓存机制
public interface OauthClientMapper extends BaseMapper<OauthClient>  {

    /**
     * 查询appid信息
     * @param appId
     * @return
     */
    @Select("select * from oauth_client where actived=1 AND app_id = #{appId} LIMIT 1")
    public OauthClient getActiveClientApp(String appId);

}